{extend name="public:base" /}


{block name="content"}

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <a href="{:url('doUser')}" class="btn btn-primary btn-lg">新增</a>

                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="iconfont icon-chevron-up"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>UID</th>
                                <th>账号</th>
                                <th>昵称</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {notempty name="list"}
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.account}</td>
                                <td>{$vo.username}</td>
                                <td>{$vo.status == 1 ? '已启用' : '已禁用'}</td>
                                <td>
                                    {if $vo.status == 2}
                                    <a href="{:url('authUser', ['id' => $vo.id, 'status' => 1])}" class="btn btn-white btn-sm ajax-operate"><i class="iconfont icon-quanxianpeizhi"></i> 启用 </a>
                                    {else /}
                                    <a href="{:url('authUser', ['id' => $vo.id, 'status' => 2])}" class="btn btn-white btn-sm ajax-operate"><i class="iconfont icon-quanxianpeizhi"></i> 禁用 </a>
                                    {/if}
                                    <a href="{:url('delUser', ['id' => $vo.id])}" class="btn btn-white btn-sm ajax-operate"><i class="iconfont icon-trash"></i> 删除 </a>
                                </td>
                            </tr>
                            {/volist}
                            {/notempty}
                            </tbody>
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}




